//
//  TouSuListCell.m
//  阿帕
//
//  Created 阿帕 on 2019/12/22.
//  Copyright © 2019 GCY. All rights reserved.
//

#import "TouSuListCell.h"

@interface TouSuListCell ()

@property (weak, nonatomic) IBOutlet UILabel *nicknameLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@end

@implementation TouSuListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _nicknameLabel.textColor = Dark_TextColor;
    _contentLabel.textColor = Light_TextColor;
    _dateLabel.textColor = Light_TextColor;
    _statusLabel.textColor = Theme_ColorValue;
    _lineView.backgroundColor = BackgroundColor;
}

- (void)setModel:(TouSuListModel *)model {
    
    _model = model;
    
    _nicknameLabel.text = CJStringWithFormat(@"%@ %@",model.shipmentName, model.shipmentPhone);

//    if (model.abnormalFrom == 1) {
//        //投诉我的
//        _nicknameLabel.text = CJStringWithFormat(@"%@ %@",_model.driverName,_model.driverPhone);
//    } else {
//        //我投诉的
//        _nicknameLabel.text = CJStringWithFormat(@"%@ %@",model.shipmentName, model.shipmentPhone);
//    }
    
    _dateLabel.text = _model.occurrenceTime;
    _contentLabel.text = _model.address;
    
    CGSize size = [DCSpeedy dc_calculateTextSizeWithText:_model.abnormalRemark WithTextFont:14 WithMaxW:ScreenW-30];
    
    _model.cellHeight = size.height + 100;
    
    if (_model.isHandle == 0) {
        _statusLabel.text = @"未处理";
        _statusLabel.textColor = Orange_Color;
    } else {
        _statusLabel.text = @"已处理";
        _statusLabel.textColor = Theme_ColorValue;
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
